//dataSource {
//    pooled = true
//    driverClassName = "org.h2.Driver"
//    username = "sa"
//    password = ""
//}
dataSource {
    pooled = true
    driverClassName = "com.mysql.jdbc.Driver"
    username = "sa"
    password = ""
}
hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = false
    cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
environments {
    development {
        dataSource {
            //dbCreate = "create" // one of 'create', 'create-drop', 'update', 'validate', ''
            url = "jdbc:mysql://localhost:8889/pijunn"
			username = "pijunn"
			password = "l@mpP@55"
			//logSql = true
        }
    }
    test {
        dataSource {
            //dbCreate = "update"
            //url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
            url = "jdbc:mysql://localhost:8889/pijunn_migration"
			username = "pijunn"
			password = "l@mpP@55"
       }
    }
    production {
        dataSource {
		    pooled = true
		    dbCreate = "update"
		    driverClassName = "com.mysql.jdbc.Driver"
		    url = System.getProperty("JDBC_CONNECTION_STRING")
		    dialect = org.hibernate.dialect.MySQL5InnoDBDialect
		    properties {
		      validationQuery = "SELECT 1"
		      testOnBorrow = true
		      testOnReturn = true
		      testWhileIdle = true
		      timeBetweenEvictionRunsMillis = 1000 * 60 * 30
		      numTestsPerEvictionRun = 3
		      minEvictableIdleTimeMillis = 1000 * 60 * 30
		    }
       }
    }
}
